﻿using System.Windows;
using System.Windows.Media;

namespace Niaofei.WPF.Control
{
    public class RadioButton : System.Windows.Controls.RadioButton
    {
        static RadioButton()
        {
            DefaultStyleKeyProperty.OverrideMetadata(typeof(RadioButton), new FrameworkPropertyMetadata(typeof(RadioButton)));
        }

        public bool IsBorder
        {
            get { return (bool)GetValue(IsBorderProperty); }
            set { SetValue(IsBorderProperty, value); }
        }

        public static readonly DependencyProperty IsBorderProperty =
            DependencyProperty.Register("IsBorder", typeof(bool), typeof(RadioButton), new PropertyMetadata(false));

        public double IconWidth
        {
            get { return (double)GetValue(IconWidthProperty); }
            set { SetValue(IconWidthProperty, value); }
        }

        public static readonly DependencyProperty IconWidthProperty =
            DependencyProperty.Register("IconWidth", typeof(double), typeof(RadioButton), new PropertyMetadata(null));

        public double IconHeight
        {
            get { return (double)GetValue(IconHeightProperty); }
            set { SetValue(IconHeightProperty, value); }
        }

        public static readonly DependencyProperty IconHeightProperty =
            DependencyProperty.Register("IconHeight", typeof(double), typeof(RadioButton), new PropertyMetadata(null));

        public Thickness IconMargin
        {
            get { return (Thickness)GetValue(IconMarginProperty); }
            set { SetValue(IconMarginProperty, value); }
        }

        public static readonly DependencyProperty IconMarginProperty =
            DependencyProperty.Register("IconMargin", typeof(Thickness), typeof(RadioButton), new PropertyMetadata(null));

        public Brush IsCheckBrush
        {
            get { return (Brush)GetValue(IsCheckBrushProperty); }
            set { SetValue(IsCheckBrushProperty, value); }
        }

        public static readonly DependencyProperty IsCheckBrushProperty =
            DependencyProperty.Register("IsCheckBrush", typeof(Brush), typeof(RadioButton), new PropertyMetadata(null));
    }
}
